// import {reqMockLogin} from "../../api/mockRequests";
import {reqLogin} from "../../api/realRequests";

export default ({
    namespaced: true,
    state: {},
    mutations: {},
    actions: {
        async doLogin(context, value) {
            // 请求尚硅谷的后台登录接口
            let result = await reqLogin(value)
            console.log(result)
            if (result.code == 20000) {
                return 'ok!'
            } else {
                return Promise.reject(new Error('faile!'))
            }
        }
    },
    getters: {}
})